#pragma once
#include "math.h"
#include "Texture.h"
#include "Dllexport.h"
#include <vector>
namespace NBGUI
{
	class GUIAPI RendererBase
	{
	public: 
		virtual inline HWND getHwnd()=0;
		virtual void initDrawing(void* vbuff, unsigned int vLength, void* ibuff, unsigned int iLength)=0;
		virtual int createTexture(const char* path)=0;
		virtual int createTexture(const wchar_t* name, void* data, unsigned int width, unsigned int height, 
			unsigned int format, unsigned int type, int colorLen)=0;

		virtual void loadTex(Texture* tex)=0;
		//drawing
		virtual int createVBO(void* buff, unsigned int length, unsigned int verSize ,unsigned int shIdx, char* fmt)=0;
		virtual int createIBO(void* pIBO, unsigned int length)=0;
		virtual bool updateVBO(void* newBuff, unsigned int start,unsigned int length,unsigned int verSize, int vboId)=0;
		virtual void deleteVBO(int vboId)=0;
		virtual void deleteIBO(int iboId)=0;

		virtual void swapBuffer(bool sync)=0;
		virtual void drawIndexed( unsigned int startIdx, unsigned int len, int vboId, int iboId)=0;
		virtual void applyShader(unsigned int idx)=0;
		virtual void applyTexture(unsigned int idx)=0;

		virtual void beforeFrame()=0;
		virtual void buildCamMatrix()=0;
		//virtual void drawCircle(vec2i& p, int radius)=0;

		virtual void turnOffDepth()=0;

		unsigned int screenWidth;
		unsigned int screenHeight;
	};
}